<form id="addGoods" class="form-horizontal" role="form">
    <div class="form-group">
        <label class="control-label col-sm-4">商品名称：</label>

        <div class="col-sm-8">
            <input class="form-control" type="text" name="name" placeholder="请输入商品名称"
                   read="<%= goods != '' ? 'true' : 'false' %>"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-4">商品价格：</label>

        <div class="col-sm-8">
            <div class="input-group">
                <input class="form-control" type="text" name="price" placeholder="请输入商品价格"/>
                <span class="input-group-addon">元</span>
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-4">商品大小及数量：</label>

        <div class="col-sm-8" id="info">
            <div id="info-0">
                <div class="input-group">
                    <div class="input-group-btn">
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            选择数量
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu pull-right">
                            <li><a href="javascript:;" onclick="setCount(this,'0')">100</a></li>
                            <li><a href="javascript:;" onclick="setCount(this,'0')">1000</a></li>
                            <li><a href="javascript:;" onclick="setCount(this,'0')">10000</a></li>
                        </ul>
                    </div>
                    <input class="form-control" type="text" name="size" placeholder="商品大小"
                           style="width: 50%;float: left;padding: 5px"/>
                    <input class="form-control" type="text" placeholder="请输入数量" id="countValid-0" name="countValid"
                           onchange="getCount(this,'0')"
                           style="width: 50%;float: left;padding: 5px"/>
                    <span class="input-group-addon" style="border-left: 0;border-right: 0;">*</span>
                    <span class="input-group-addon" id="number-0">1</span>
                    <input class="hide" type="text" id="count-0" name="count"/>
                </div>
                <div style="margin-bottom: 10px;">
                    <a href="javascript:addNode()" style="text-decoration: none">
                        <span class="glyphicon glyphicon-plus-sign ion-content icon-add" aria-hidden="true">添加</span>
                    </a>
                    <a href="javascript:delNode('info-0')" style="text-decoration: none">
                        <span class="glyphicon glyphicon-minus-sign ion-content icon-dec" aria-hidden="true">删除</span>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-4" for="file">文件上传</label>

        <div class="col-sm-8">
            <input type="file" id="file" name="file" multiple="multiple"/>
            <input type="text" name="files" class="hide"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-4">商品详情布置：</label>
        <div class="col-sm-8">
            <div id="editor"></div>
        </div>
    </div>
    <input type="text" class="hide" name="number"/>
    <div class="col-sm-offset-4 col-sm-8">
        <button class="btn btn-primary btn-block" type="button" onclick="saveGoods()">添加商品</button>
    </div>
</form>
